﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Media;

using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.Plugins;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace XSOL
{
    class PathOfFrost : HBPlugin
    {
        public override string Name { get { return "PathOfFrost"; } }
        public override string Author { get { return "xsol"; } }
        public override Version Version { get { return new Version(1, 0, 0, 0); } }

        public override bool WantButton { get { return true; } }
        public override string ButtonText { get { return "N/A"; } }

        private static LocalPlayer me = StyxWoW.Me;


        public PathOfFrost()
        {

        }

        //private DateTime LastCheck = DateTime.Now.Subtract(new TimeSpan(0, 0, 20));

        public override void Pulse()
        {
            if (!StyxWoW.IsInGame)
            {
                return;
            }

            //if (DateTime.Now.Subtract(LastCheck).TotalSeconds > 19)
            //{
            if (!me.Combat)
            {
                if (!me.Buffs.ContainsKey("Path of Frost"))
                {
                    SpellManager.Cast("Path of Frost");
                }
            }
            //    LastCheck = DateTime.Now;
            //}
        }


        public override void OnButtonPress()
        {

        }


        public override void Dispose()
        {
            base.Dispose();
        }


    }
}
